<div class="note">
  <% fields_for "ticket[notes_attr][]", note do |f| %>
    <p>
      <%=h note.note_type.name%> <%= notefield note %>

      <% if note.new_record? %>
        <%= f.hidden_field :note_type_id, :index => nil %>
      <% else %>
        <%= f.hidden_field :id, :index => nil %>
      <% end %>
    </p>
  <% end %>
</div>
